<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Text2D - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">Text2D</h1>
		<section>
			<header>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">Text2D</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import * as Text2D from 'three/addons/webxr/Text2D.js';</code></pre>
				<div class="container-overview">
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="~createText" translate="no">.<a href="#~createText">createText</a><span class="signature">( message : <span class="param-type">string</span>, height : <span class="param-type">number</span> )</span><span class="type-signature"> : <a href="Mesh.html">Mesh</a></span> <span class="type-signature">(inner) </span></h3>
					<div class="method">
						<div class="description">
							<p>A helper function for creating a simple plane mesh
that can be used as a text label. The mesh's material
holds a canvas texture that displays the given message.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>message</strong>
									</td>
									<td class="description last">
										<p>The message to display.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>height</strong>
									</td>
									<td class="description last">
										<p>The labels height.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> The plane mesh representing a text label.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/webxr/Text2D.js" translate="no" target="_blank" rel="noopener">examples/jsm/webxr/Text2D.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>